using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.XPath;
using System.IO;
using System.Collections.ObjectModel;

namespace AntEater.Runtime.Services.Transformation
{
    /// <summary>
    /// Result of an Transformation of the
    /// Build Element Component Model into a Build Xml File.
    /// </summary>
    public class BuildElementToXmlTransformationResult
    {

        /// <summary>
        /// Initializes a new instance of the <see cref="BuildElementToXmlTransformationResult"/> class.
        /// </summary>
        /// <param name="buildFile">The build file.</param>
        /// <param name="errors">The errors.</param>
        internal BuildElementToXmlTransformationResult(Stream buildFile, List<TransformationError> errors) {
            this._buildFile = buildFile;
            this._errors = new ReadOnlyCollection<TransformationError>(errors);
        }
        
        private Stream _buildFile;

        /// <summary>
        /// Gets or sets the build file.
        /// </summary>
        /// <value>The build file.</value>
        public Stream BuildFile {
            get { return _buildFile; }
        }

        private ReadOnlyCollection<TransformationError> _errors;

        /// <summary>
        /// Gets or sets the errors.
        /// </summary>
        /// <value>The errors.</value>
        public ReadOnlyCollection<TransformationError> Errors {
            get { return _errors; }
        }
    }
}
